package com.wigem.fa.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wigem.framework.common.util.common.GuidUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 项目督导对象 fa_supervisor
 *
 * @author HH
 * @date 2025-02-21
 */

@Data
@ApiModel
@TableName("fa_supervisor")
public class FaSupervisorEntity {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @ApiModelProperty(value = "", name = "id")
    @TableId
    private String id;

    /**
     * 企业id
     */
    @ApiModelProperty(value = "企业id", name = "entId")
    @TableField(value = "ent_id")
    private String entId;

    @ApiModelProperty(value = "申报id", name = "applyId")
    @TableField(value = "apply_id")
    private String applyId;

    @ApiModelProperty(value = "企业名称", name = "orgName")
    @TableField(exist = false)
    private String orgName;

    /**
     * 报告期id
     */
    @ApiModelProperty(value = "报告期id", name = "reportId")
    @TableField(value = "report_id")
    private String reportId;

    /**
     * 督导次数
     */
    @ApiModelProperty(value = "督导次数", name = "entSupervisorNum")
    @TableField(exist = false)
    private String entSupervisorNum;

    /**
     * 督导时间
     */
    @ApiModelProperty(value = "督导时间", name = "supervisorTime")
    @TableField(value = "supervisor_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date supervisorTime;

    /**
     * 督导事项
     */
    @ApiModelProperty(value = "督导事项", name = "supervisorItem")
    @TableField(value = "supervisor_item")
    private String supervisorItem;

    /**
     * 企业反馈
     */
    @ApiModelProperty(value = "企业反馈", name = "entFeedback")
    @TableField(value = "ent_feedback")
    private String entFeedback;


    @ApiModelProperty(value = "拨付金额", name = "finalFund")
    @TableField(exist = false)
    private String finalFund;


    @ApiModelProperty(value = "申报类型", name = "policyType")
    @TableField(exist = false)
    private String policyType;

    /**
     * 删除标记
     */
    @ApiModelProperty(value = "删除标记", name = "removeMark")
    @TableField(value = "remove_mark")
    private String removeMark;

    public void create() {
        this.id = GuidUtils.generate();
    }

    public void modify(String keyValue) {
        this.id = keyValue;
    }

}
